# lst=list()
# for i in range(3):
#     pho=input("请输入车牌号:")
#     lst.append(pho)
# for item in lst:
#     print(item,'归属于地',item[0:1])
'''统计字符串出现指定字符的次数'''
str='hellopython,hellojava,hellophp'
st=input("请输入你要查询的字符串")
len1=len(st)
len2=len(str)
count=0
for i in range(0,len2-len1+1):
    ret=str[i:i+len1]
    if ret==st:
        count=count+1
print(st,'在',str,'出现的次数为',count)
#print('{0}在{1}一共出现了{2}次数'.format(st,str,str.count(st)))
